package com.vanzo.some.interphone;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.vanzo.some.R;

/**
 * Created by tisen on 2017/12/27.
 */

class ConnectItem extends RecyclerView.ViewHolder {

    private TextView title;
    private TextView summary;


    public ConnectItem(View itemView) {
        super(itemView);
        title = (TextView) itemView.findViewById(R.id.connect_item_title);
        summary = (TextView) itemView.findViewById(R.id.connect_item_summary);
    }

    public void bind(Connect connect) {
        title.setText(connect.getTitle());
        String summaryString = "TX:" + connect.getTx() + "\t\tRX:" + connect.getRx() + "\n色码:" + connect.getColor_code() + "\t\t本机ID:" + connect.getOwner_id() + "\t\t组呼ID:" + connect.getGroup_id();
        summary.setText(summaryString);
    }
}
